Trò chơi Tic-Tac-Toe, game đánh caro full source code
53.473 lượt xem;
- PhotonTransformViewPositionModel.cs
- Views /
- PhotonNetwork /
- Plugins /
- Photon Unity Networking /
- Assets /
- project /
1 using UnityEngine;
2 using System.Collections;
3
4 [System.Serializable]
5 public class PhotonTransformViewPositionModel
6 {
7 public enum InterpolateOptions
8 {
9 Disabled,
10 FixedSpeed,
11 EstimatedSpeed,
12 SynchronizeValues,
13 //MoveTowardsComplex,
14 Lerp,
15 }
16
17 public enum ExtrapolateOptions
18 {
19 Disabled,
20 SynchronizeValues,
21 EstimateSpeedAndTurn,
22 FixedSpeed,
23 }
24
25 public bool SynchronizeEnabled;
26
27 public bool TeleportEnabled = true;
28 public float TeleportIfDistanceGreaterThan = 3f;
29
30 public InterpolateOptions InterpolateOption = InterpolateOptions.EstimatedSpeed;
31 public float InterpolateMoveTowardsSpeed = 1f;
32 public float InterpolateLerpSpeed = 1f;
33 public float InterpolateMoveTowardsAcceleration = 2;
34 public float InterpolateMoveTowardsDeceleration = 2;
35 public AnimationCurve InterpolateSpeedCurve = new AnimationCurve( new Keyframe[] {
36 new Keyframe( -1, 0, 0, Mathf.Infinity ),
37 new Keyframe( 0, 1, 0, 0 ),
38 new Keyframe( 1, 1, 0, 1 ),
39 new Keyframe( 4, 4, 1, 0 ) } );
40
41 public ExtrapolateOptions ExtrapolateOption = ExtrapolateOptions.Disabled;
42 public float ExtrapolateSpeed = 1f;
43 public bool ExtrapolateIncludingRoundTripTime = true;
44 public int ExtrapolateNumberOfStoredPositions = 1;
45
46 //public bool DrawNetworkGizmo = true;
47 //public Color NetworkGizmoColor = Color.red;
48 //public ExitGames.Client.GUI.GizmoType NetworkGizmoType;
49 //public float NetworkGizmoSize = 1f;
50
51 //public bool DrawExtrapolatedGizmo = true;
52 //public Color ExtrapolatedGizmoColor = Color.yellow;
53 //public ExitGames.Client.GUI.GizmoType ExtrapolatedGizmoType;
54 //public float ExtrapolatedGizmoSize = 1f;
55
56 public bool DrawErrorGizmo = true;
57 }
2 using System.Collections;
3
4 [System.Serializable]
5 public class PhotonTransformViewPositionModel
6 {
7 public enum InterpolateOptions
8 {
9 Disabled,
10 FixedSpeed,
11 EstimatedSpeed,
12 SynchronizeValues,
13 //MoveTowardsComplex,
14 Lerp,
15 }
16
17 public enum ExtrapolateOptions
18 {
19 Disabled,
20 SynchronizeValues,
21 EstimateSpeedAndTurn,
22 FixedSpeed,
23 }
24
25 public bool SynchronizeEnabled;
26
27 public bool TeleportEnabled = true;
28 public float TeleportIfDistanceGreaterThan = 3f;
29
30 public InterpolateOptions InterpolateOption = InterpolateOptions.EstimatedSpeed;
31 public float InterpolateMoveTowardsSpeed = 1f;
32 public float InterpolateLerpSpeed = 1f;
33 public float InterpolateMoveTowardsAcceleration = 2;
34 public float InterpolateMoveTowardsDeceleration = 2;
35 public AnimationCurve InterpolateSpeedCurve = new AnimationCurve( new Keyframe[] {
36 new Keyframe( -1, 0, 0, Mathf.Infinity ),
37 new Keyframe( 0, 1, 0, 0 ),
38 new Keyframe( 1, 1, 0, 1 ),
39 new Keyframe( 4, 4, 1, 0 ) } );
40
41 public ExtrapolateOptions ExtrapolateOption = ExtrapolateOptions.Disabled;
42 public float ExtrapolateSpeed = 1f;
43 public bool ExtrapolateIncludingRoundTripTime = true;
44 public int ExtrapolateNumberOfStoredPositions = 1;
45
46 //public bool DrawNetworkGizmo = true;
47 //public Color NetworkGizmoColor = Color.red;
48 //public ExitGames.Client.GUI.GizmoType NetworkGizmoType;
49 //public float NetworkGizmoSize = 1f;
50
51 //public bool DrawExtrapolatedGizmo = true;
52 //public Color ExtrapolatedGizmoColor = Color.yellow;
53 //public ExitGames.Client.GUI.GizmoType ExtrapolatedGizmoType;
54 //public float ExtrapolatedGizmoSize = 1f;
55
56 public bool DrawErrorGizmo = true;
57 }
MoveTowardsComplex,
public bool DrawNetworkGizmo = true;
public Color NetworkGizmoColor = Color.red;
public ExitGames.Client.GUI.GizmoType NetworkGizmoType;
public float NetworkGizmoSize = 1f;
public bool DrawExtrapolatedGizmo = true;
public Color ExtrapolatedGizmoColor = Color.yellow;
public ExitGames.Client.GUI.GizmoType ExtrapolatedGizmoType;
public float ExtrapolatedGizmoSize = 1f;